package com.crm.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.crm.domain.entity.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;


/**
 * @author Xanny
 */
public interface UserMapper extends BaseMapper<User> {
    @Update("update user set status=#{status} where id=#{userId}")
    void updateStatusById(@Param("status") String status,@Param("userId") Long userId);

    @Update("update user set del_flag=#{delFlag},status='1' where id=#{userId}")
    void updateDelFlagById(Long delFlag, long userId);

    void batchInsert(List<User> list);
}
